package ooday03homework;

import java.awt.*;

public class RefArrayDemo {
    public static void main(String[] args) {
        Dog[] dogs = new Dog[3];
        dogs[0] = new Dog("灰太狼",25, Color.darkGray);
        dogs[1] = new Dog("红太狼",25,Color.red);
        dogs[2] = new Dog("小白狼",24,Color.white);
        for (int i=0;i< dogs.length;i++){
            dogs[i].eat();
            dogs[i].drink();
            dogs[i].LookHome();
            dogs[i].swim();
        }
        System.out.println("-----------------------------------");

        Fish[] fishs = new Fish[3];
        fishs[0] = new Fish("泡泡",4,Color.red);
        fishs[1] = new Fish("美美",4,Color.pink);
        fishs[2] =new Fish("阿酷",4,Color.blue);
        for (int i=0;i< fishs.length;i++){
            fishs[i].eat();
            fishs[i].swim();
            fishs[i].drink();
        }
        System.out.println("-----------------------------------");

        Chick[] chicks = new Chick[3];
        chicks[0] =new Chick("鸡米花",4,Color.yellow);
        chicks[1] =new Chick("坤坤",4,Color.darkGray);
        chicks[2] =new Chick("鸡鸡",4,Color.ORANGE);
        for (int i=0;i< chicks.length;i++){
            chicks[i].eat();
            chicks[i].drink();
            chicks[i].XiaEggs();
        }
    }
}
